package com.zq.spring.event;

import com.zq.spring.config.EventConfig;
import com.zq.spring.event.DemoPublisher;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author: zhaoqi
 * @Date: 2020/4/24 10:33
 * @Version 1.0
 */


public class DemoEventTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigApplicationContext  = new AnnotationConfigApplicationContext(EventConfig.class);
        DemoPublisher demoPublisher = annotationConfigApplicationContext.getBean(DemoPublisher.class);
        demoPublisher.publish("123123");
        annotationConfigApplicationContext.close();

    }


}
